<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:bc="http://brightcontent.net/ns/comments"
                xmlns:thr="http://purl.org/syndication/thread/1.0"
                xmlns="http://www.w3.org/2005/Atom"
                exclude-result-prefixes="#default bc">

 <xsl:param name="bc:atom_id">tag:comment_id</xsl:param>
 <xsl:param name="bc:atom_title">comment</xsl:param>
 <xsl:param name="bc:atom_author_name" />
 <xsl:param name="bc:atom_author_uri" />
 <xsl:param name="bc:atom_updated"></xsl:param>
 <xsl:param name="bc:atom_published"></xsl:param>
 <xsl:param name="bc:atom_content" />
 <xsl:param name="bc:parent_id" />
 <xsl:param name="bc:parent_link" />
 <xsl:param name="bc:comment_anchor" />

 
 <xsl:template match="/">
<entry>
  <id><xsl:value-of select="$bc:atom_id" /></id>
  <title><xsl:value-of select="$bc:atom_title" /></title>
  <author>
    <name><xsl:value-of select="$bc:atom_author_name" /></name>
    <xsl:if test="$bc:atom_author_uri">
    <uri><xsl:value-of select="$bc:atom_author_uri" /></uri>
    </xsl:if>
  </author>
  <updated><xsl:value-of select="$bc:atom_updated" /></updated>
  <published><xsl:value-of select="$bc:atom_published" /></published>
  <link href="{concat(concat($bc:parent_link, '#'), $bc:comment_anchor)}" 
        rel="alternate" title="Comment Permalink" />
  <link href="{$bc:parent_link}" rel="related" />
  <link href="{$bc:atom_id}" rel="self" title="Comment Atom" />
  <thr:in-reply-to
    ref="{$bc:parent_id}"
    type="application/xhtml+xml"
    href="{$bc:parent_link}"/>
  <content type="html"><xsl:value-of select="$bc:atom_content" /></content>
</entry>
 </xsl:template>

</xsl:stylesheet>